import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        component: () => import('../layout/layout.vue'),
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('../views/home/home.vue')
            },
            {
                path: '/my',
                component: () => import('../views/my/my.vue')
            }
        ]
    }
];

const router = new VueRouter({
    mode: "history",
    base: process.env.BASE_URL,
    routes,
});

export default router;
